From: Florian Müllner Date: Fri, 13 Aug 2021 01:09:51 +0000 (+0200) Subject: appDisplay: Handle null value X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~128 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5b3036a6bf431f5f398f14b0dc869ed79d0a63f2;p=gnome-shell.git appDisplay: Handle null value The value can not actually be null at that point, but it's too hard to spot for tools like coverity: - before setting view, we chain up to the parent's acceptDrop() - that calls _canAccept(), which we override and check for the view Still, and extra ? doesn't hurt, and hopefully will make the tooling happy. CID 351269 Part-of: --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 3673c8541..a3e60b834 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -3399,7 +3399,7 @@ var AppIcon = GObject.registerClass({ let view = _getViewFromIcon(this); let apps = [this.id, source.id]; - return view.createFolder(apps); + return view?.createFolder(apps); } cancelActions() {